<template>
  <component
    :is="computedOptions.component" 
    v-bind="computedOptions.bind"
    v-on="computedOptions.on"
  >
  </component>
</template>
<script>
// 导入表格内组件
const context = require.context('./components', true, /\.vue$/)
let components = {}
context.keys().forEach(key => {
  let cmp = context(key).default
  components[cmp.name] = cmp
})
export default {
  name: 'ColumnContent',
  components: { ...components },
  props: {
    scope: Object,
    options: Function,
    prop: String
  },
  data() {
    return {}
  },
  computed: {
    computedOptions() {
      return this.options(this.scope)
    }
  }
}
</script>
